<cfsetting enablecfoutputonly="Yes">
<!---
	where/index.cfm
--->

<cfmodule template="_head.cfm" pageTitle="">

<cfoutput>
<script language="JavaScript" type="text/javascript">
function findAddr(a,onsuccess,onfail) { var fos = onsuccess; var fof = onfail; try { window.frames['nwsmapright'].updateMap(a,fos,fof); } catch(e) { if(fof) { fof(); } else { alert(e); } } } // findAddr
function addLocal() { try { window.frames['nwsmapright'].addLocalSearch(); } catch(e) { alert(e); } }
function clearResults(l) { try { window.frames['nwsmapleft'].clearSearchResults(l); } catch(e) { alert(e); } }
function addResult(n,t,la,ln,a,p) { try { window.frames['nwsmapleft'].addSearchResult(n,t,la,ln,a,p); } catch(e) { alert(e); } }
function finalizeResults() { try { window.frames['nwsmapleft'].finalizeSearchResults(); } catch(e) { alert(e); } }
function openSearchResult(l,n) { try { window.frames['nwsmapright'].openResult(l,n); } catch(e) { alert(e); } }
var pid = 0;
function getPlaces(cx,cy,n,e,w,s) {
	pid = pid + 1;
	var postBody = [
		'v=1',
		'&pid=', pid,
		'&cx=', cx,
		'&cy=', cy,
		'&n=', n,
		'&e=', e,
		'&w=', w,
		'&s=', s
	].join('');
	ajax("places.cfm", postBody, function(resp){
		var x = resp.documentElement;
		if(x.tagName.toUpperCase() == 'ERROR') { alert(x.text || x.textContent); return false; }
		else if(x.tagName.toUpperCase() != 'PLACES') return false;
		if(x.getAttribute('key') != '#Session.GeoKey#') return false;
		if(x.getAttribute('pid') != pid) return false;
		var reqAttrs = String("placeid,title,lat,lng,street,city,region,country,phone").split(',');
		window.frames['nwsmapright'].clearPlaces();
		for(var i = 0; i < x.childNodes.length; i++) { // >
			var p = x.childNodes[i];
			if(p.nodeType != 1) continue;
			if(p.tagName.toUpperCase() != 'PLACE') continue;
			var vals = {};
			for(var j = 0; j < reqAttrs.length; j++) vals[reqAttrs[j]] = p.getAttribute(reqAttrs[j]) || ''; // >
			if(isNaN(vals.lat) || isNaN(vals.lng) || (vals.title.length == 0)) continue;
			window.frames['nwsmapright'].addPlace(vals);
		} // for i
		window.frames['nwsmapright'].showPlaces();
	}); // ajax
} // getPlaces
function ajax(url, vars, callbackFunction){
	var request = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0");
	request.open("POST", url, true);
	request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
	request.onreadystatechange = function(){
		if ((request.readyState == 4) && (request.status == 200)) {
			if (request.responseXML){
				callbackFunction(request.responseXML);
			}
		}
	};
	request.send(vars);
} // ajax
</script>
</head>
<frameset frameborder="0" framespacing="0" id="nwsmapframestop" rows="56,*" border="0" bordercolor="white">
	<frame frameborder="0" marginheight="0" marginwidth="0" id="nwsmaphead" scrolling="0" noresize="noresize" name="nwsmaphead" src="head.cfm" bordercolor="white"/>
	<frameset frameborder="0" framespacing="0" id="nwsmapframesbottom" cols="250,*" border="0" bordercolor="white">
		<frame frameborder="0" marginheight="0" marginwidth="0" id="nwsmapleft" scrolling="0" noresize="noresize" name="nwsmapleft" src="intro.cfm" bordercolor="white"/>
		<frame frameborder="0" marginheight="0" marginwidth="0" id="nwsmapright" scrolling="0" noresize="noresize" name="nwsmapright" src="map.cfm" bordercolor="white"/>
	</frameset>
</frameset>
<noframes>
<body>
<p>Sorry, but this part of nowrists.com requires a frames-capable web browser.</p>
</body>
</noframes>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-98191-6";
_udn = "nowrists.com";
try { urchinTracker(#up#); } catch(e) { }
</script></html>
</cfoutput>

<cfsetting enablecfoutputonly="No">